Smart Contracts Software Metrics: a First Study
نویسندگان
چکیده
Smart contracts (SC) are software codes which reside and run over a blockchain. The code can be written in different languages with the common purpose of implementing various kinds of transactions onto the hosting blockchain, They are ruled by the blockchain infrastructure and work in order to satisfy conditions typical of traditional contracts. The software code must satisfy constrains strongly context dependent which are quite different from traditional software code. In particular, since the bytecode is uploaded in the hosting blockchain, size, computational resources, interaction between different parts of sofware are all limited and even if the specific software languages implement more or less the same constructs of traditional languages there is not the same freedom as in normal software development. SC software is expected to reflect these constrains on SC software metrics which should display metric values characteristic of the domain and different from more traditional software metrics. We tested this hypotesis on the code of more than twelve thousands SC written in Solidity and uploaded on the Ethereum blockchain. We downloaded the SC from a public repository and computed the statistics of a set of software metrics related to SC and compared them to the metrics extracted from more traditional software projects. Our results show that generally Smart Contracts metrics have ranges more restricted than the corresponding metrics in traditional software systems. Some of the stylized facts, like power law in the tail of the distribution of some metrics, are only approximate but the lines of code follow a log normal distribution which reminds of the same behavior already found in traditional software systems.
منابع مشابه
Adding Concurrency to Smart Contracts
Modern cryptocurrency systems, such as Ethereum, permit complex financial transactions through scripts called smart contracts. These smart contracts are executed many, many times, always without real concurrency. First, all smart contracts are serially executed by miners before appending them to the blockchain. Later, those contracts are serially re-executed by validators to verify that the sma...
متن کاملA survey of attacks on Ethereum smart contracts
Smart contracts are computer programs that can be correctly executed by a network of mutually distrusting nodes, without the need of an external trusted authority. Since smart contracts handle and transfer assets of considerable value, besides their correct execution it is also crucial that their implementation is secure against attacks which aim at stealing or tampering the assets. We study th...
متن کاملA Semantic Framework for the Security Analysis of Ethereum smart contracts
Smart contracts are programs running on cryptocurrency (e.g., Ethereum) blockchains, whose popularity stem from the possibility to perform financial transactions, such as payments and auctions, in a distributed environment without need for any trusted third party. Given their financial nature, bugs or vulnerabilities in these programs may lead to catastrophic consequences, as witnessed by recen...
متن کاملConsumers’ Perspective on Full-Scale Adoption of Smart Meters: A Case Study in Västerås, Sweden
Large-scale deployment of reliable smart electricity metering networks has been considered as the first step towards a smart, integrated and efficient grid. On the consumer’s side, however, the real impact is still uncertain and limited. This paper evaluates the consumer’s perspective in the city of Västerås, Sweden, where full implementation of smart meters has been reached. New services, such...
متن کاملBraided Cobwebs: Cautionary Tales for Dynamic Retail Pricing in End-to-End Power Systems
This study investigates the effects of dynamic-price retail contracting on end-to-end power system operations. Performance is evaluated by means of carefully defined metrics for system stability, market efficiency, and market participant welfare. The study is carried out for an Integrated Retail and Wholesale (IRW) Test Case for which households have smart (price-responsive) air-conditioning (A...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- CoRR
دوره abs/1802.01517 شماره
صفحات -
تاریخ انتشار 2018